package com.jxdinfo.hussar.activitidemo.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.jxdinfo.hussar.activitidemo.bean.TdbYjMImgPosition;
import com.jxdinfo.hussar.activitidemo.bean.TdbYjMImgPositionDic;
import com.jxdinfo.hussar.activitidemo.bean.TdbYjMImgPositionDicForPic;
import com.jxdinfo.hussar.activitidemo.bean.TdbYjMImgPositionPictures;
import com.jxdinfo.hussar.activitidemo.dao.TdbYjMImgPositionMapper;

/**
 * <p>
 * 车型图片故障代码位置表 服务实现类
 * </p>
 *
 * @author 
 * @since 2019-05-29
 */
@Service
@Transactional
public class TdbYjMImgPositionServiceImpl extends ServiceImpl<TdbYjMImgPositionMapper, TdbYjMImgPosition> implements ITdbYjMImgPositionService {

    @Autowired
    private TdbYjMImgPositionMapper mapper;
    @Override
    public Page<TdbYjMImgPosition> selectByCondition(Page<TdbYjMImgPosition> page, TdbYjMImgPosition info) {
        List<TdbYjMImgPosition> list = mapper.selectByCondition(page, info);
        page.setRecords(list);
        Integer count = mapper.selectCountByCondition(info);
        page.setTotal(count);
        return page;
    }
	@Override
	public int addCltpInfo(TdbYjMImgPosition tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.addCltpInfo(tdbYjMImgPosition);
	}
	@Override
	public int updateCltpDicInfo(TdbYjMImgPositionDic tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.updateCltpDicInfo(tdbYjMImgPosition);
	}
	@Override
	public int addCltpImg(TdbYjMImgPositionPictures tdbYjMImgPositionPictures) {
		// TODO Auto-generated method stub
		return mapper.addCltpImg(tdbYjMImgPositionPictures);
	}
	
	@Override
	public int updateCltpImg(TdbYjMImgPositionPictures tdbYjMImgPositionPictures) {
		// TODO Auto-generated method stub
		return mapper.updateCltpImg(tdbYjMImgPositionPictures);
	}
	
	@Override
	public int updateBatch(Map tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.updateBatch(tdbYjMImgPosition);
	}
	@Override
	public List<TdbYjMImgPositionDicForPic> getsign(TdbYjMImgPosition tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.getsign(tdbYjMImgPosition);
	}
	@Override
	public String selectIdByTraintypeAndCode(TdbYjMImgPosition tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.selectIdByTraintypeAndCode(tdbYjMImgPosition);
	}
	@Override
	public List<TdbYjMImgPositionPictures> initCltpImgInfo(TdbYjMImgPosition tdbYjMImgPosition) {
		// TODO Auto-generated method stub
		return mapper.initCltpImgInfo(tdbYjMImgPosition);
	}
	
	@Override
	public int deleteCltpImg(TdbYjMImgPositionPictures tdbYjMImgPositionPictures) {
		// TODO Auto-generated method stub
		return mapper.deleteCltpImg(tdbYjMImgPositionPictures);
	}
}
